from pattern.circuit import Control

class entry(Control):
    
    def realize(self, event):
        if not hasattr(event.shape, "key"):
            event.shape.key = "default"

    def please(self, event):
        bridge = self.acquireInterface(event, "bottom:50%")
        if bridge is None:
            return "No storage."
        else:
            return bridge.pull().get(event.shape.key, "Key not found.")
